﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jquery")
    @RenderSection("scripts", required: true)
</head>
<body>
    <div id="container">
        <div id="content">
            <header>
                <a href="@Url.Action("Index","Home")" id="logo"></a>
                <nav>
                    <ul>
                        <li>@Html.ActionLink("На главную", "Index", "Home", new { area = "Default" }, new { @class="menu-point" })</li>
                        <li>@Html.ActionLink("Меню", "Index", "Menu", new { area = "Default" }, new { @class="menu-point" })</li>
                        <li>@Html.ActionLink("Гостевая", "Index", "Guest", new { area = "Default" }, new { @class="menu-point" })</li>
                    </ul>
                    <ul>
                        @if (User.IsInRole("Admin"))
                        {
                            @*<li>@Html.ActionLink("На главную", "Index", "Home", new { area = "Admin" }, null)</li>*@
                            <li>@Html.ActionLink("Меню", "Index", "Menu", new { area = "Admin" }, new { @class="menu-point-admin" })</li>
                            <li>@Html.ActionLink("Управление новостями", "Index", "News", new { area="Admin" }, new { @class="menu-point-admin" })</li>
                            <li>@Html.ActionLink("Гостевая", "Index", "Guest", new { area = "Admin" }, new { @class="menu-point-admin" })</li>
                        }
                        <li>@Html.ActionLink("Сброс базы данных", "Recreate", "Menu", new { area = "Admin" }, new { @class="menu-point-admin" })</li>
                    </ul>
                </nav>
            </header>
            <div id="main-content">
                @RenderBody()
            </div>
        </div>
    </div>
    <footer>
        Made by Victor Golubev<br />
        @if (Request.IsAuthenticated)
        {
            <b>@Html.Encode(User.Identity.Name)</b> 
            @:(@Html.ActionLink("Log Out", "LogOut", "User", new { area = "Default" }, null))
        }
        else
        {
            @Html.ActionLink("Log In", "Login", "User", new { area = "Default" }, null)
            @:(@Html.ActionLink("Register", "Register", "User", new { area = "Default" }, null))
        }
    </footer>
</body>
</html>
